<%@ page import="com.zhiyou100.www.bbs.dao.TableTitleDao" %>
<%@ page import="com.zhiyou100.www.bbs.entityclass.TableTitle" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: yang
  Date: 2020/6/7
  Time: 3:06 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" href="/bbs/css/index.css">
    <title>热点话题</title>
</head>
<body>
<%
    out.write("<table class=\"starUserTable\">");

    TableTitleDao tableTitleDao = new TableTitleDao();

    out.write("<tr><td>话题</td><td>关注度</td></tr>");

    ArrayList<TableTitle> all = tableTitleDao.getAll();

    for (TableTitle tableTitle : all) {
        out.write("<tr><td>"
                + tableTitle.getTableHead()
                + "</td><td>"
                + tableTitle.getTableLikeNumber()
                + "</td></tr>");
    }
    out.write("</table>");

%>
</body>
</html>
